<?php 
namespace Api\Controller;
use Think\Controller;
class UploadController extends Controller{
	public function uploads(){
   $imgpath=C('img_path').time().'.jpg';
        $res=move_uploaded_file($_FILES['upfilename']['tmp_name'],$imgpath);
        if($res){
            echo json_encode(['code'=>'ok','path'=>$imgpath]);
        }else{
            echo json_encode(['fail']);
        }

	}
}


























 ?>